package net.zdreamer.shunyi.ui.fragment;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;

import net.zdreamer.shunyi.R;
import net.zdreamer.shunyi.ui.login.DaCheActivity;
import net.zdreamer.shunyi.ui.myinfo.YuLeActivity;


public class HiBangFragment extends Fragment implements View.OnClickListener {
    private LinearLayout headback;
    private ImageView dache, hibangyule;
    private Intent intent;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_hi_bang, container, false);
    }


    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);

    }

    @Override
    public void onStart() {
        super.onStart();
        headback = (LinearLayout) getView().findViewById(R.id.hibangback);
        dache = (ImageView) getView().findViewById(R.id.dache);
        dache.setOnClickListener(this);
        hibangyule = (ImageView) getView().findViewById(R.id.hibangyule);
        hibangyule.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.dache:
                intent = new Intent(getActivity(), DaCheActivity.class);
                startActivity(intent);
                break;
            case R.id.hibangyule:
                intent = new Intent(getActivity(), YuLeActivity.class);
                startActivity(intent);
                break;
            default:
                break;
        }
    }
}
